"""Django_Blog URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path,include
# from register import views as registerview
from django.contrib.staticfiles.views import serve
from django.views.generic.base import RedirectView
urlpatterns = [
    # 后台页请求
    path('admin/', admin.site.urls),

    # 头像请求
    path('favicon.ico', serve, {'path': 'static/img/favicon.ico'}),
    path('favicon.ico', RedirectView.as_view(url='static/img/favicon.ico')),
    
    # 空字符串则默认分发主页
    path('',include('blog.urls')),

    # circular: 通知app
    path('circular/',include('circular.urls')),

    # register/login/logout: 注册/登录/登出请求,没有需求,暂时不需要
    # path('register/',registerview.register,name='register'),
    # path('login/',registerview.login,name='login'),
    # path('logout/',registerview.logout,name='logout'),
    # get_auth_img: 二维码请求
    # path('get_auth_img/',registerview.GetAuthImg,name='get_auth_img'),

    # activity: 活动发布app,没有需求,暂时不需要
    # path('activity/',include('activity.urls')),
    
    path('mdeditor/',include('mdeditor.urls')),
]
